import os.path
import os
import random
def creat_filename():
    lst=['水果', '烟酒', '粮油', "肉蛋", '蔬菜']
    lst1=["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]
    filename_lst=[]
    for item in range(1,301):
        filename=''
        if item<10:
            filename+=''+"000"+ str(item)
        elif item<100:
            filename+=''+"00"+ str(item)
        elif item < 1000:
            filename+=''+"0"+ str(item)
        else:
            filename+=''+str(item)
        filename+='_'+ random.choice(lst)
        s=''
        for i in range(9):
                s+=random.choice(lst1)
        filename+='_'+s
        filename_lst.append(filename)
    return  filename_lst
def creat_file(filename):
    with open(filename,'w',encoding='utf-8') as file:
        pass


if __name__=='__main__':
    path='./date'
    if 4==4:
        os.mkdir(path)
    lst3=creat_filename()
    for i in lst3:
        creat_file(os.path.join(path,i)+'.text')


    #print(creat_filename())




